package com.itboye.jmsfhz.app.login.ui;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.itboye.core.alert.ByAlert;
import com.itboye.core.object.BaseActivity;
import com.itboye.jmsfhz.R;

public class ForgetPasswordActivity extends BaseActivity {

	EditText forget_password_et;
	Button find_password_bt;
	ImageView back;
	TextView txt_title;
	ImageView img_other;

	@Override
	public int initView() {
		// TODO Auto-generated method stub
		return R.layout.activity_forget_password;
	}

	@Override
	public void onMyCreate() {
		// TODO Auto-generated method stub
		txt_title.setText("忘记密码");
		img_other.setVisibility(View.GONE);
		back.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
		find_password_bt.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				if (forget_password_et.getText().toString() != null) {
					if (forget_password_et.getText().toString().trim() != null) {
						Intent intent = new Intent(ForgetPasswordActivity.this,
								FindBackPasswordActivity.class);
						intent.putExtra("phoneNumber", forget_password_et
								.getText().toString().trim());
						startActivity(intent);
					}
				} else {
					ByAlert.alert("请输入手机号码");// , 0).show();
				}
			}
		});
	}

}
